package com.woniu.goodsservice.controller;

import com.github.pagehelper.PageInfo;
import com.woniu.goodsservice.entity.Goodstype;
import com.woniu.goodsservice.service.GoodstypeService;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("goodstype")
public class GoodstypeController {
    @Resource
    private GoodstypeService goodstypeService;

    @GetMapping("selectOne")
    public Goodstype selectOne(Integer id) {
        return goodstypeService.queryById(id);
    }


    @RequestMapping("/list")
    public List<Goodstype> list(){
        List<Goodstype> list=goodstypeService.findGoodstypeByPage();
        return list;
    }

}